Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update vibc-core-smart-contracts dependency #4

Merged
merged 8 commits into from
Feb 16, 2024

Conversation

tmsdkeys
Copy link
Contributor

@tmsdkeys tmsdkeys commented Feb 15, 2024

This PR:

  • updates the vibc-core-smart-contracts repo dependency (API breaking)
  • updates the dummy contracts for new API
  • adds the hardhat-foundry npm package to enable compatibility with both Hardhat and Foundry

Summary by CodeRabbit

  • Chores
    • Updated the core smart contracts to the latest version for enhanced performance and security.
    • Updated the .gitignore file to include directories for Foundry files and updated .gitmodules for the "forge-std" submodule.
    • Modified solidity contracts for IBC functionality and import paths.
    • Updated hardhat.config.js with new module requirements and Solidity version.
    • Introduced new files lib/forge-std and updated lib/vibc-core-smart-contracts.
    • Removed remapping for @openzeppelin in remappings.txt.
    • Enhanced readability and maintainability in scripts/create-channel.js.
    • Added functionality for sending universal packets in send-universal-packet.js.
    • Updated deployment configurations in deploy-config.js to handle universal channel boolean flag.

Copy link
Contributor

coderabbitai bot commented Feb 15, 2024

Walkthrough

The changes span various files, enhancing project structure, introducing new functionalities, updating dependencies, and streamlining configurations for improved development and maintenance.

Changes

Files Changed Summary of Changes
.gitignore, .gitmodules Updated to include Foundry directories, added a new submodule declaration for "forge-std".
contracts/CustomChanIbcContract.sol Updated import paths, added new imports and functions, modified parameters and logic for better functionality.
contracts/UniversalChanIbcContract.sol Updated import paths, refactored function calls, adjusted logic for packet handling and acknowledgements.
hardhat.config.js Added @nomicfoundation/hardhat-foundry module, updated Solidity version, and configured additional paths for sources, tests, cache, artifacts, and libraries.
lib/forge-std, lib/vibc-core-smart-contracts Introduced new file lib/forge-std with a subproject commit, updated subproject commit reference in lib/vibc-core-smart-contracts.
remappings.txt Removed remapping for @openzeppelin from lib/openzeppelin-contracts/.
scripts/create-channel.js Enhanced functionality for creating a channel by encapsulating configuration details within objects for improved readability and maintainability.
README.md Updated Solidity contracts template functionality, added compatibility with Hardhat and Foundry, revised deployment instructions, and introduced universal channels option.
scripts/deploy-config.js Modified deploy-config.js to accept a universal channel boolean flag, updating configurations based on the flag.
scripts/send-universal-packet.js Added send-universal-packet.js for sending universal packets using Hardhat, including contract retrieval, packet preparation, sending, and acknowledgment handling.

🐇🌟
Code changes dance, a digital waltz,
Paths diverge, in the code's exalt.
Modules added, logic refined,
With each commit, progress defined.
🚀🌈
In the realm of bytes, we craft and weave,
Blockchain dreams, our goals achieve.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 653c11a and b97249c.
Files selected for processing (1)
  • lib/vibc-core-smart-contracts (1 hunks)
Additional comments: 1
lib/vibc-core-smart-contracts (1)
  • 1-1: Ensure all dependent code and contracts have been updated to be compatible with the new API version of vibc-core-smart-contracts.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b97249c and b3d094a.
Files ignored due to path filters (3)
  • foundry.toml is excluded by: !**/*.toml
  • package-lock.json is excluded by: !**/*.json
  • package.json is excluded by: !**/*.json
Files selected for processing (9)
  • .gitignore (1 hunks)
  • .gitmodules (1 hunks)
  • contracts/CustomChanIbcContract.sol (6 hunks)
  • contracts/UniversalChanIbcContract.sol (4 hunks)
  • hardhat.config.js (2 hunks)
  • lib/forge-std (1 hunks)
  • lib/vibc-core-smart-contracts (1 hunks)
  • remappings.txt (1 hunks)
  • scripts/create-channel.js (1 hunks)
Files skipped from review due to trivial changes (2)
  • .gitignore
  • lib/forge-std
Files skipped from review as they are similar to previous changes (1)
  • lib/vibc-core-smart-contracts
Additional comments: 16
remappings.txt (1)
  • 5-5: Ensure that no contract files rely on the removed @openzeppelin remapping for dependency resolution. If any contracts use this path in import statements, update those imports accordingly.
.gitmodules (1)
  • 4-6: LGTM!
hardhat.config.js (3)
  • 2-2: LGTM!
  • 9-9: LGTM!
  • 38-44: Verify that the specified paths in the configuration align with the actual project directory structure.
contracts/UniversalChanIbcContract.sol (4)
  • 5-8: LGTM!
  • 38-38: Verify that the use of IbcUtils.toBytes32(destPortAddr) aligns with the updated API requirements for address conversion.
  • 51-51: Ensure that the logic for generating AckPacket in onRecvUniversalPacket function aligns with the updated API's requirements and the intended contract behavior.
  • 63-63: Verify that the address comparison logic in onUniversalAcknowledgement function correctly implements the updated API's requirements for address conversion and comparison.
scripts/create-channel.js (2)
  • 34-45: LGTM!
  • 50-54: Verify that the use of local and cp objects in the createChannel function call correctly passes the necessary configuration details for channel creation.
contracts/CustomChanIbcContract.sol (5)
  • 5-8: LGTM!
  • 35-37: LGTM!
  • 74-79: Verify that the modifications to the createChannel function parameters correctly implement the updated API's requirements for channel creation.
  • 71-103: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [95-123]

Ensure that the adjustments to the onOpenIbcChannel function parameters and logic correctly implement the version negotiation process as per the updated API's requirements.

  • 157-157: Verify that the simplifications to the onCloseIbcChannel function parameters do not impact the intended functionality and align with the updated API's requirements.

hardhat.config.js Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 8

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b3d094a and 71e5aba.
Files selected for processing (4)
  • README.md (3 hunks)
  • hardhat.config.js (2 hunks)
  • scripts/deploy-config.js (2 hunks)
  • scripts/send-universal-packet.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • hardhat.config.js

scripts/send-universal-packet.js Show resolved Hide resolved
scripts/send-universal-packet.js Show resolved Hide resolved
scripts/send-universal-packet.js Show resolved Hide resolved
scripts/deploy-config.js Show resolved Hide resolved
scripts/deploy-config.js Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@tmsdkeys tmsdkeys merged commit 533ef9b into main Feb 16, 2024
@tmsdkeys tmsdkeys deleted the thomas/update-vibc-core branch February 23, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant